package com.gxks.mall_manager.dao;

import com.gxks.commons.entity.Manager;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

@Mapper
public interface ManagerDao {

    public List<Manager> selectAll(Map<String,Object> search);

    @Delete("delete from manager where manager_id = #{id}")
    int deleteById(Long id);

    @Update("update manager set manager_state = null where manager_state = #{stateId}")
    int resetState(Long stateId);

    int addSave(Manager manager);

    Manager selectById(Long id);

    int update(Manager manager);

    int deleteSome(Long[] managerId);

    int editState(Long[] managerId, Integer state);
}
